﻿/**************************************************************
 *
 * 命名空间：Sgr.DataCategories.Application.Commands.AdministrativeDivisions
 * 创建时间：2025/3/19
 * 描述：删除行政区划命令
 *
 **************************************************************/

using MediatR;
using Sgr.Application.Commands;
using Sgr.Domain.Uow;

namespace Sgr.DataCategories.Application.Commands.AdministrativeDivisions
{
    /// <summary>
    /// 删除行政区划命令
    /// </summary>
    public class DeleteAdministrativeDivisionCommand : IRequest<CommandResult<bool>>, IRequireUnitOfWork
    {
        /// <summary>
        /// 行政区划ID
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 是否级联删除
        /// </summary>
        public bool IsCascade { get; set; }

        /// <summary>
        /// 创建一个新的删除行政区划命令实例
        /// </summary>
        public DeleteAdministrativeDivisionCommand()
        {
        }

        /// <summary>
        /// 创建一个新的删除行政区划命令实例
        /// </summary>
        /// <param name="id">行政区划ID</param>
        /// <param name="isCascade">是否级联删除</param>
        public DeleteAdministrativeDivisionCommand(long id, bool isCascade)
        {
            Id = id;
            IsCascade = isCascade;
        }
    }
}